package net.lzzy.practices.entities;

import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;
import javax.xml.crypto.Data;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @author m
 */ //结果类
@Entity
@Getter
@Setter
public class Result extends  BaseEntity {
    @Transient
//    正确
    public  static  final  int TYPE_RIGHT=0;
    @Transient
//   少选
    public  static  final  int TYPE_MISS=1;
    @Transient
//    多选
    public  static  final  int TYPE_EXTRA=2;
    @Transient
//    错误
    public  static  final int TYPE_UNDO=4;
    @Temporal(TemporalType.TIMESTAMP)
    private Date commitTime;
    @ManyToOne
    private User student;

    @ManyToOne
    private  Question question;
    
    @ManyToMany
    private List<Option> options = new ArrayList<>();
    public Result(){
        commitTime = new Date();
    }
}
